package cn.good.yan.feign;

import cn.good.yan.pojo.Bill;
import cn.good.yan.pojo.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * Feign 的配置
 * FeignClient注解，value=服务名  , fallbackFactory 是 feign与Hystrix整合的
 *
 * @author shengren.yan
 * @create 2023-12-25
 */
@FeignClient(value = "CLOUD1-PROVIDER", contextId = "PaymentFeignService", fallbackFactory = fallbackfactory.class)
public interface PaymentFeignService {

    @GetMapping("/bill/get/{id}")
    CommonResult getPaymentById(@PathVariable("id") Long id);

//    @PostMapping("/bill/get/test")
//    CommonResult getPaymentById(@RequestBody Bill bill);

}
